<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<script type="text/javascript">
	function departmentLookupTreeOnClick(event, treeId, treeNode, clickFlag){
		event.preventDefault();
		$("#"+treeNode.tId+"_a").attr("data-toggle","lookupback");
		$("#"+treeNode.tId+"_a").attr("data-args","{departmentSn:'"+treeNode.id+"', departmentName:'"+treeNode.departmentname+"', departmentNo:'"+treeNode.departmentno+"'}");
	}
</script>
<div class="bjui-pageContent">
   <div>
		<ul id="ztree-test-demo2" class="ztree" data-toggle="ztree" 
			data-options="{expandAll:true,onClick:'departmentLookupTreeOnClick'}">
			<c:forEach items="${departments}" var="department">
			<li data-id="${department.departmentSn}" data-pId="${department.parentDepartSn}" 
				data-departmentname="${department.departmentNamePath}" data-departmentno="${department.departmentNo}"
				>${department.departmentName}</li>
			</c:forEach>
		</ul>
	</div>
</div>